/**
 * 
 */
package edu.pku.sei.modeler.editparts;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.CompoundBorder;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.MarginBorder;
import org.eclipse.gef.editpolicies.DirectEditPolicy;
import org.eclipse.swt.graphics.Color;

import edu.pku.sei.modeler.edit.parts.AbstractNodeEditPart;
import edu.pku.sei.modeler.model.structure.MetaShapeElement;

/**
 * @deprecated
 * @author zl
 *
 */
public class TemplatePortEditPart extends AbstractNodeEditPart {
	public TemplatePortEditPart (MetaShapeElement model) {
		super(model);
	}
	
	protected DirectEditPolicy createDirectEditPolicy() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
	 */
	protected IFigure createFigure() {
		Label label = new Label();
		label.setBorder(new CompoundBorder(new LineBorder(ColorConstants.buttonDarker,1), new MarginBorder(1)));
		label.setBackgroundColor(new Color(null,255,255,0));
		return label;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies()
	 */
	protected void createEditPolicies() {
		super.createEditPolicies();
	}
	
//	private TemplatePort getTemplatePort() {
//		return (TemplatePort)((MetaNode)getModel()).getElement();
//	}
	
	protected void refreshVisuals() {
//		super.refreshVisuals();		
//		Label header = (Label)getFigure();
//		header.setText(getTemplatePort().getName());
	}
}
